package infosender

import (
	"fmt"
	"net"
	"os"
	"time"
)

var socket *net.UDPConn = nil

func init() {
	for {
		var err error = nil
		socket, err = net.DialUDP("udp4", nil, &net.UDPAddr{
			IP:   net.IPv4(127, 0, 0, 1),
			Port: 2333,
		})
		if err != nil {
			fmt.Println("连接失败!", err)
			time.Sleep(10 * time.Millisecond)
			continue
		} else {
			break
		}
	}

}
func main() {
	f, _ := os.OpenFile("../bug_log", os.O_RDONLY, os.FileMode.Perm())
	f
}
